package com.song.web.service;

import com.song.book.pojo.Book;
import com.song.web.config.FigenConfig;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 宋伟宁
 * @Date 2024/1/5
 * @Version 1.0
 **/
@FeignClient(name = "book-service8000",path = "book",configuration = FigenConfig.class)
public interface BookFeignService {

    @GetMapping("/")
    public Result findBooks();
    @GetMapping("/{id}")
    public Result findBookById(@PathVariable("id") Long id) ;

    @PostMapping("/")
    public Result save(@RequestBody Book book);

    @DeleteMapping("/{id}")
    public Result delete(@PathVariable("id") Long id);
}
